import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import moment from 'moment';

import myui from './myui'
Vue.use(myui)

// 导入图标样式
import './myui/index.scss';

// 导入字体样式库
import './assets/fonts/iconfont.css'

// 导入全局样式表
import './assets/css/global.css'

import apis from './script/apis.js'
Vue.prototype.$apis=apis;
 
 // 定义全局时间戳过滤器
 Vue.filter('formatDate', function(value) {
   return moment(Number(value)).format('YYYY-MM-DD HH:mm:ss')
 })

import VueParticles from 'vue-particles'
Vue.use(VueParticles)
        

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

import axios from 'axios'
Vue.prototype.$http=axios;

axios.interceptors.request.use(config => {
  config.headers[`Authorization`] = 'Bearer'+store.state.token;
  return config;
});

// 配置请求的跟路径
axios.defaults.baseURL = 'http://120.53.31.103:84/api/';

// 导入全局样式表
import './assets/css/global.css';

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
